home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1998 August / PC Direct August 1998.iso / S / powerj / Product / samples.z / Button.wxc < prev    next >
Encoding:
Text File  |  1998-03-25  |  2.5 KB  |  121 lines

  1. Save Format v2.3(19971110)
  2. @begin ClassFile "Button"
  3.  
  4.  @begin Object "Powersoft Java AWT 1.10::powersoft.painter.Class"
  5.   DesignName Button;
  6.   @begin ClassProperties
  7.    Exported 1;
  8. @begin-code BaseClassList
  9.  
  10. extends Form_Button 
  11.  
  12. @end-code;
  13.   @end;
  14.   @begin UserFunctions
  15.    @begin UserFunction "Button()"
  16.     @begin Definition
  17.      FunctionScope 3;
  18.      GeneratedFunction 1;
  19. @begin-code SourceCode "Button()"
  20.  
  21.     public Button()
  22.     {
  23.         super();
  24.     }
  25.  
  26. @end-code;
  27.     @end;
  28.    @end;
  29.    @begin UserFunction "init()"
  30.     @begin Definition
  31.      FunctionScope 3;
  32. @begin-code SourceCode "init()"
  33.  
  34.     public void init()
  35.     {
  36.         super.init();
  37.         addNotify();
  38.         createAppletForm();
  39.     }
  40.  
  41. @end-code;
  42.     @end;
  43.    @end;
  44.    @begin UserFunction "createAppletForm()"
  45.     @begin Definition
  46.      FunctionScope 3;
  47.      GeneratedFunction 1;
  48. @begin-code SourceCode "createAppletForm()"
  49.  
  50.     public void createAppletForm()
  51.     {
  52.         try {
  53.             create();
  54.         } catch ( java.lang.Exception __e ) {}
  55.     }
  56.  
  57. @end-code;
  58.     @end;
  59.    @end;
  60.    @begin UserFunction "main(String args[])"
  61.     @begin Definition
  62.      FunctionScope 3;
  63.      GeneratedFunction 1;
  64. @begin-code SourceCode "main(String args[])"
  65.  
  66.     public static void main(String args[])
  67.     {
  68.         Button applet = new Button();
  69.         _Button_frame f = new _Button_frame();
  70.         f.setResizable(false);
  71.         f.add(applet);
  72.         f.addNotify();
  73.         java.awt.Insets insets = f.getInsets();
  74.         applet.setMainForm(true);
  75.         applet.init();
  76.         applet.setLocation(insets.left,insets.top);
  77.         f.setSize(applet.getPreferredSize());
  78.         applet.setSize(applet.getPreferredSize());
  79.         f.setVisible(true);
  80.     }
  81.  
  82. @end-code;
  83.     @end;
  84.    @end;
  85.   @end;
  86.   @begin CodeBlocks
  87.    @begin CodeBlock "HppPrefix"
  88.     FunctionScope 1;
  89. @begin-code SourceCode "Imports()"
  90.  
  91. // add your custom import statements here
  92.  
  93. @end-code;
  94.    @end;
  95.    @begin CodeBlock "ClassContents"
  96.     FunctionScope 1;
  97. @begin-code SourceCode "Data Members()"
  98.  
  99.     // add your data members here
  100.  
  101. @end-code;
  102.    @end;
  103.    @begin CodeBlock "GeneratedClassContents"
  104.     FunctionScope 1;
  105. @begin-code SourceCode "GeneratedClassContents()"
  106.  
  107.  
  108. @end-code;
  109.    @end;
  110.    @begin CodeBlock "CppPrefix"
  111.     FunctionScope 6;
  112.     GeneratedFunction 1;
  113. @begin-code SourceCode "Not Applicable for Java()"
  114.  
  115.  
  116. @end-code;
  117.    @end;
  118.   @end;
  119.  @end;
  120. @end;
  121.